<!doctype html>
<html>
<head>
  <title>播放</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
  <meta http-equiv="Pragma" content="no-cache"/>
  <meta http-equiv="Cache-Control" content="no-cache, must-revalidate"/>
  <meta http-equiv="Expires" content="0"/>
</head>
<body>
<div id="myVideo"></div>
</body>
</html>

<script src="js/jquery-1.10.2.min.js"></script>
<script type="application/javascript">
  var domain = 'http://gg.jiuge_mc.com/wx/xcx/';
//  var domain = 'https://ganguo.fuzhuangchangongxiao.cn/wx/xcx/';
  (function(){
    getIndex();
  })();
  function getIndex(){
    var formData = {
      page:0, limit:1
    };
    $.ajax({
      url: domain+'index/video/index',
      method: "POST",
      header: {'content-type': 'application/x-www-form-urlencoded'},
      data: formData,
      success: function (res) {
//        console.log(res)
        if (res.code!=0) {
          alert(res.msg); return
        }
        var d = res.data[0];
        console.log(d)
        var h = '';
        h += '<video id="video" controls autoplay="1" width="200" height="340" poster="'+ d.vcover+'" src="'+ d.vlink+'"></video>';
        console.log(h)
        $('#myVideo')[0].innerHTML = h;
      }
    });
  }
</script>